package com.example.yingjiguanli_demo.service.impl;

import com.example.yingjiguanli_demo.mapper.LoginLogMapper;
import com.example.yingjiguanli_demo.pojo.LoginLog;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class LoginAsyncService {
    @Resource
    private LoginLogMapper loginLogMapper;

    @Async
    public void saveLoginLog(LoginLog loginLog) {
        // 异步保存登录日志的逻辑
        loginLogMapper.insert(loginLog);
    }

}
